module(
    name = "openconfig_gnmi",
    version = "0.14.1",
)

bazel_dep(name = "gazelle", version = "0.41.0", repo_name = "bazel_gazelle")
bazel_dep(name = "grpc", version = "1.69.0", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "protobuf", version = "29.3", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_proto", version = "7.0.2")
bazel_dep(name = "rules_go", version = "0.51.0", repo_name = "io_bazel_rules_go")

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.23.4")

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(go_deps, "com_github_cenkalti_backoff_v4", "com_github_golang_glog", "com_github_google_go_cmp", "com_github_kylelemons_godebug", "com_github_openconfig_grpctunnel", "com_github_openconfig_ygot", "com_github_protocolbuffers_txtpbfmt", "org_bitbucket_creachadair_stringset", "org_golang_google_grpc", "org_golang_google_grpc_cmd_protoc_gen_go_grpc", "org_golang_google_protobuf", "org_golang_x_crypto", "org_golang_x_net")

go_deps_dev = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps", dev_dependency = True)
go_deps_dev.gazelle_override(
    directives = [
        "gazelle:proto disable",  # keep
        "gazelle:resolve go github.com/openconfig/gnmi/errlist @openconfig_gnmi//errlist:errlist",  # keep
    ],
    path = "github.com/openconfig/grpctunnel",
)
go_deps_dev.gazelle_override(
    directives = [
        "gazelle:resolve go github.com/openconfig/gnmi/proto/gnmi @openconfig_gnmi//proto/gnmi:gnmi",  # keep
        "gazelle:resolve go github.com/openconfig/gnmi/errlist @openconfig_gnmi//errlist:errlist",  # keep
        "gazelle:resolve go github.com/openconfig/gnmi/value @openconfig_gnmi//value:value",  # keep
    ],
    path = "github.com/openconfig/ygot",
)

inject_repo(go_deps, "openconfig_gnmi")
